import request from '@/utils/request'
// 获取部门列表
export const getDepartmentApi = () => {
  return request.get('/company/department')
}

// 获取负责人下拉列表
export const getUserListApi = () => {
  return request.get('/sys/user/simple')
}

// 获取新增接口
export const addDeptApi = (data) => request.post('/company/department', data)

// 获取部门详情
export const getDepartmentDetailApi = (id) => {
  return request.get(`/company/department/${id}`)
}

// 修改部门
export const updateDepartmentApi = (data) => {
  return request.put(`/company/department/${data.id}`, data)
}

// 删除部门
export const delDeparmentApi = (id) => request.delete(`/company/department/${id}`)
